---
title: numberToHangulMixed
---

import { Sandpack } from '@/components/Sandpack';

# numberToHangulMixed

For the given numbers, it automatically appends Korean numerical units that change every four digits,
and it supports spacing based on the 'man(萬)' unit to meet various requirements.

```typescript
function numberToHangulMixed(input: number, options?: { spacing?: boolean }): string;
```

## Examples

```tsx
numberToHangulMixed(210_000); // '21만';
numberToHangulMixed(12_345); // '1만2,345';
numberToHangulMixed(123_456_780); // '1억2,345만6,780';
numberToHangulMixed(-12_345.678); // '-1만2,345.678';
numberToHangulMixed(123_456_780, { spacing: true }); // '1억 2,345만 6,780';
```

## 사용해보기

<br />

<Sandpack>

```ts index.ts
import { numberToHangulMixed } from 'es-hangul';

console.log(numberToHangulMixed(1_2345_6780));
console.log(numberToHangulMixed(1_2345_6780, { spacing: true }));
```

</Sandpack>
